package com.insurance.common.enums;

import lombok.Data;
import org.apache.commons.lang.StringUtils;

/**
 * 企业证件类型通用枚举类
 *
 * @version 1.0
 * @date 2020/9/20
 **/
public enum EnterpriseCardTypeEnum {

    ZZJGDMZ("01", "组织机构代码证"),
    SWDJZ("02", "税务登记证"),
    TYSHXYDM("03", "统一社会信用代码"),
    GSYYZZH("04", "工商营业执照号"),
    QT("99", "其他");

    private String code;

    private String msg;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    EnterpriseCardTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMessage(String code){
        String message = "";
        EnterpriseCardTypeEnum[] values = EnterpriseCardTypeEnum.values();
        for (EnterpriseCardTypeEnum enterpriseCardTypeEnum : values){
            if(code.equals(enterpriseCardTypeEnum.getCode())){
                message = enterpriseCardTypeEnum.getMsg();
                break;
            }
        }
        return message;
    }



}
